<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>查询水果案例</title>
		<script type="text/javascript">
			var fruit = prompt('请输入水果的名称:');
			switch(fruit) {
				case '苹果':
					alert('苹果3.5元/斤');
					break;
				case '榴莲':
					alert('榴莲35元/斤');
					break;
				default:
					alert('没有此水果')
					break;
			}
		</script>
	</head>

	<body>
	</body>

</html>